//
//  BaseNetworkRequest+FoodInfoDetails.m
//  ShiWuPai
//
//  Created by app on 16/11/30.
//  Copyright © 2016年 QQ:244987427. All rights reserved.
//

#import "BaseNetworkRequest+FoodInfoDetails.h"
#import "WHFoodDetails.h"
#import <YYModel.h>


@implementation BaseNetworkRequest (FoodInfoDetails)

+(void)getFoodDetailsWithCode:(NSString *)code success:(void(^)(id responseObj,NSError *error))completionHandler{

    NSString *path=[NSString stringWithFormat:@"foods/%@/mode_show",code];
    [self rquestWithType:@"GET" Path:path Parameters:nil success:^(id responseObj, NSError *error) {
        if (!error) {
            WHFoodDetails *foodDetails=[WHFoodDetails yy_modelWithJSON:responseObj];
            completionHandler(foodDetails,nil);
        }
        else{
            completionHandler(nil,error);
        }
    }];
}
@end
